home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMIBEST4.ADF / CLI Information / CLI Commands < prev    next >
Text File  |  1987-07-22  |  13KB  |  657 lines

  1.  
  2.  
  3.  
  4.  
  5.                         AMIGA DOS & CLI Commands
  6.  
  7.  
  8. Original version by Roy Ready, additions and corrections by John Foust, 
  9. for AMICUS Amiga Computer Users, November 1985.
  10.  
  11. The following article is meant as a quick reference card for those users 
  12. without an AmigaDOS Manual.
  13.  
  14. The AmigaDOS environment has a sort of built-in help.  If you remember the 
  15. command but forget the syntax for the arguments you can ask AmigaDOS to 
  16. show you.  The syntax for this kind of help is :
  17.  
  18.       < Command > < space > ? < return >
  19.  
  20. AmigaDOS will respond by showing you the argument template.  This template 
  21. has three qualifiers which are preceded by slashes as follows:
  22.  
  23.       /A   -    this argument must be present and may NOT be omitted.
  24.       /K   -    the argument must use this keyword
  25.       /S   -    this argument is used as a switch
  26.  
  27.  
  28.  
  29. AmigaDOS Commands Quick Reference Card
  30.  
  31. User's Commands
  32.  
  33.  
  34. File Utilities
  35.  
  36.  
  37. ;       comment character
  38.  
  39.       Format    :  [<command>] ; [<comment>]
  40.  
  41.       Template  : "command" ; "comment"
  42.  
  43.       Examples  :
  44.            copy DF0:c/list to ram:   ;  Copy list program to RAM drive
  45.            list DF1:                 ; display directory of DF1: drive
  46.                 Anything after a ';' on a CLI line is ignored.
  47.  
  48.  
  49.  
  50.  < >    Direct standard input and output, respectively
  51.  
  52.       Format    : <command> [ < ]  [ > ] [<arg>] 
  53.  
  54.       Template  : "command" > "TO" < "FROM" "args"
  55.  
  56.       Examples  :
  57.            DATE > date-file
  58.                 sends the output of the DATE command to file 'date-file'
  59.            SOMEPROG < input-file
  60.                 directs the data in file 'input-file' to the program 
  61.                 named SOMEPROG.
  62.             Note that the usual standard input is the keyboard, and the
  63.                 standard output is the screen, unless you re-direct input
  64.                 and output with these commands.
  65.                 
  66.                 
  67.            
  68.  
  69.  COPY           copies one file to another or
  70.                 copies all the files from one directory to another.  
  71.   
  72.       Format   : COPY [[FROM] <name> ] [TO <name> ] [ALL] [QUIET]
  73.   
  74.       Template : COPY "FROM,TO/A,ALL/S,QUIET/S"
  75.   
  76.       Examples : 
  77.            COPY DF0: TO DF1: ALL QUIET
  78.                 copies all files in all directories from DF0: to DF1:.
  79.                 New sub-directories are created on DF1:
  80.            COPY print-file TO PRT:
  81.                 copies a file to the printer device
  82.  
  83.  
  84.  
  85.  
  86.  DELETE         deletes up to 10 files or directories.
  87.  
  88.       Format   : DELETE <name> [<name>] [ALL] [QQUIET]
  89.  
  90.       Template : DELETE ",,,,,,,,,,ALL/S,Q=QUIET/S
  91.  
  92.       Examples :
  93.             DELETE out-dated-file
  94.             DELETE temps/file1 temps/file1
  95.             DELETE df1: ALL QUIET
  96.                 deletes all files in all directories on DF1:, without
  97.                     telling which files were deleted
  98.  
  99.  
  100.  
  101.  
  102.  DIR            shows filenames in a directory.
  103.  
  104.       Format   : DIR [<name>] [OPT AIAI]
  105.  
  106.       Template : DIR "DIR,OPT/K"
  107.  
  108.       Examples :
  109.            DIR
  110.                 lists files in current directory
  111.            DIR DF1: OPT A
  112.                 lists files in all sub-directories below current directory
  113.  
  114.  
  115.  
  116.  
  117.  ED             enters a screen editor for text files. 
  118.  
  119.       Format   : ED [FROM] <name> [SIZE <n>]
  120.  
  121.       Template : ED "FROM/A,SIZE"
  122.  
  123.       Examples :
  124.            ED temp/ed-file
  125.            ED large-file SIZE 55000
  126.     
  127.  
  128.  
  129.  EDIT           enters a line editor.
  130.  
  131.       Format   : EDIT [FROM] <name> [[TO] <name> ] [WITH <name> ]
  132.                       [VER <name>] [OPT <option>]
  133.  
  134.       Template : EDIT "FROM/A,TO,WITH/K,VER/K,OPT/K"
  135.  
  136.       Examples :
  137.            EDIT ed-file WITH edits VER nil:
  138.            EDIT orig-file TO new-file
  139.  
  140.  
  141.  
  142.  
  143.  FILENOTE       attaches a note with a maximum of 80 characters
  144.                 to a specified file.
  145.  
  146.       Format   : FILENOTE [FILE] <file> COMMENT <string>
  147.  
  148.       Template : FILENOTE "FILE/A,COMMENT/K"
  149.  
  150.       Examples :
  151.            FILENOTE my-picture COMMENT "drawn in November"
  152.            FILENOTE src-file COMMENT "source for screen"
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  JOIN           concatenates up to 15 files to form a new file.
  160.  
  161.       Format   : JOIN <name> <name> [<name>] AS <name>
  162.  
  163.       Template : JOIN ",,,,,,,,,,,,,,AS/A/K"
  164.  
  165.       Examples :
  166.            JOIN src-file1 src-file2 AS all-src
  167.            JOIN text data results AS experiment
  168.  
  169.  
  170.  
  171.  
  172.  LIST           examines and displays detailed information 
  173.                 about a file or directory.
  174.  
  175.       Format   : LIST [DIR] <dir> [PPAT <pat>] [KEYS] [DATES] [NODATES]
  176.                  [TO <name>] [S <string>] [SINCE <date>] [UPTO <date>] 
  177.                  [QUICK]
  178.  
  179.       Template : LIST "DIR,P=PAT/K,KEYS/S,DATES/S,NODATES/S,TO/K,
  180.                        S/K,SINCE/K,UPTO/K,QUICK/S"
  181.  
  182.       Examples :
  183.            LIST DF1:
  184.            LIST P ??
  185.                 list info about files matching pattern ?? (that is, all
  186.                     files with two character names)
  187.            LIST :l S handler
  188.                 list info about files in directory 'l' on current disk,
  189.                 searching files there for string 'handler'.
  190.  
  191.  
  192.  
  193.  
  194.  MAKEDIR        creates a directory with a specified name.
  195.  
  196.       Format   : MAKEDIR <dir>
  197.  
  198.       Template : MAKEDIR "/A"
  199.  
  200.       Examples :
  201.            MAKEDIR DF0:test
  202.            MAKEDIR RAM:temp/files
  203.  
  204.  
  205.  
  206.  
  207.  
  208.                     
  209. PROTECT        sets a file's protection status.
  210.  
  211.       Format   : PROTECT [FILE] <name> [FLAGS <status>]
  212.  
  213.       Template : PROTECT "FILE,FLAGS/K"
  214.  
  215.       Examples :
  216.            PROTECT file1 rwd
  217.            PROTECT temp/file FLAGS r
  218.  
  219.  
  220.  
  221.  RENAME         renames a file or directory.
  222.  
  223.       Format   : RENAME [FROM] <name> [TO AS] <name>
  224.  
  225.       Template : RENAME "FROM/A,TO=AS/A"
  226.  
  227.       Examples :
  228.            RENAME OLD-NAME NEW-NAME
  229.            RENAME RAM:C/FILE1 NEW-FILE
  230.  
  231.  
  232.  
  233.  
  234.  SEARCH         looks for a specified text string 
  235.                 in all the files of a directory.
  236.  
  237.       Format   : SEARCH [FROM] <name><pattern> [SEARCH] <string> [ALL]
  238.  
  239.       Template : SEARCH "FROM,SEARCH/A,ALL/S"
  240.  
  241.       Examples :
  242.            SEARCH DF0: my-name
  243.            SEARCH DF1: source ALL
  244.                 search all files on DF1: for the string "source"
  245.  
  246.  
  247.  
  248.  
  249.  SORT           sorts files.
  250.  
  251.       Format   : SORT [FROM] <name> [[TO] <name>] [COLSTART <n>]
  252.  
  253.       Template : SORT "FROM/A,TO/A,COLSTART/K"
  254.  
  255.       Examples :
  256.            SORT file TO sorted-file
  257.            SORT list TO sort-list COLSTART 5
  258.                 sorts file 'list' to 'sort-list', based on the data
  259.                     starting in column 5
  260.  
  261.  
  262.  
  263.  
  264.  TYPE           types a file to the screen that you can 
  265.                 optionally specify as text or hex.
  266.  
  267.       Format   : TYPE [FROM] <name> [[TO <name>] [OPT NH]
  268.  
  269.       Template : TYPE "FROM/A,TO,OPT/K"
  270.  
  271.       Examples :
  272.            TYPE preferences OPT H
  273.                 type a file in hex
  274.            TYPE :s/startup-sequence
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  CLI Control
  282.  
  283.  
  284.  
  285.  
  286.  BREAK          sets attention flags in a given process.
  287.  
  288.       Format   : BREAK <task> [ALL] [C] [D] [E] [F]
  289.  
  290.       Template : BREAK "TASK/A,ALL/S,C/S,D/S,E/S,F/S"
  291.  
  292.       Examples :
  293.            BREAK 6
  294.            BREAK 4 D F
  295.  
  296.  
  297.  
  298.  
  299.  CD             make a given directory and/or drive the current directory
  300.  
  301.       Format   : CD [<dir>]
  302.  
  303.       Template : CD "DIR"
  304.  
  305.       Examples :
  306.            CD RAM:
  307.                 makes RAM: the current directory
  308.            CD DF1:temp/l
  309.  
  310.  
  311.  
  312.  
  313.  ENDCLI         ends an interactive CLI process.
  314.  
  315.       Format   : ENDCLI
  316.  
  317.       Template : ENDCLI
  318.  
  319.       Examples :
  320.            ENDCLI
  321.                 closes the CLI window
  322.  
  323.  
  324.  
  325.  
  326.  NEWCLI         start a new CLI window
  327.  
  328.       Format   : NEWCLI [<window>]
  329.  
  330.       Template : NEWCLI "WINDOW"
  331.  
  332.       Examples :
  333.                 NEWCLI
  334.                 NEWCLI "CON:20/15/300/100/a new CLI"
  335.                     opens a new window titled "a new CLI" at position
  336.                     20,15, of size 300 x 100 pixels
  337.     
  338.  
  339.                     
  340. PROMPT          change the current CLI prompt
  341.  
  342.       Format   : PROMPT [<prompt>]
  343.  
  344.       Template : PROMPT "NEWPROMPT"
  345.  
  346.       Examples :
  347.                 PROMPT
  348.                     resets the prompt to ">"
  349.                 PROMPT "%n> "
  350.                     sets the prompt to "1> ", where 1 is the current
  351.                         number
  352.  
  353.  
  354.  
  355.  
  356.  RUN            executes commands as a background process.
  357.  
  358.       Format   : RUN <command>
  359.  
  360.       Template : RUN command +
  361.                      command
  362.  
  363.       Examples :
  364.            RUN TYPE :s/startup-sequence
  365.            RUN COPY :c/list TO RAM: +
  366.                CD RAM: +
  367.                LIST
  368.                 runs each command in sequence
  369.  
  370.  
  371.  
  372.  
  373.  STACK          displays or sets the stack size for commands.
  374.  
  375.       Format   : STACK [<n>]
  376.  
  377.       Template : STACK "SIZE"
  378.  
  379.       Examples :
  380.            STACK
  381.            STACK 9000
  382.  
  383.  
  384.  
  385.  
  386.  STATUS         displays information about the CLI processes 
  387.                 currently in existence.
  388.  
  389.       Format   : STATUS [<process>] [FULL] [TCB] [SEGS] [CLI  ALL]
  390.  
  391.       Template : STATUS "PROCESS,FULL/S,TCB/S,SEGS/S,CLI=ALL/S"
  392.  
  393.       Examples :
  394.            STATUS
  395.            STATUS 1 FULL
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  WHY            explains why a previous command failed.
  403.  
  404.       Format   : WHY
  405.  
  406.       Template : WHY
  407.  
  408.       Examples :
  409.            WHY
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  Command Sequence Control
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  ECHO           displays the message specified
  423.  
  424.       Format   : ECHO < string >
  425.  
  426.       Template : ECHO ""
  427.  
  428.       Examples :
  429.            ECHO "This string was echoed to the screen"
  430.  
  431.  
  432.  
  433.  
  434.  EXECUTE        executes a file of commands.
  435.  
  436.       Format   : EXECUTE <comandfile> [arguments]
  437.  
  438.       Template : EXECUTE "command-file","args"
  439.  
  440.       Examples :
  441.            EXECUTE :s/startup-sequence
  442.            EXECUTE my-command-file
  443.  
  444.  
  445.  
  446.  
  447.  FAILAT         ends a command sequence if a program returns
  448.                 an error code greater than or equal to this number.
  449.  
  450.       Format   : FAILAT <n>
  451.  
  452.       Template : FAILAT "number"
  453.  
  454.       Examples :
  455.            FAILAT
  456.                 if the program returns any error code
  457.            FAILAT 14
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  IF             tests specified actions within a command sequence.
  466.  
  467.       Format   : IF [NOT] [WARN] [ERROR] [FAIL] [<string> EQ <string>]
  468.                  [EXISTS <name>]
  469.  
  470.       Template : IF "NOT/S,WARN/S,ERROR/S,FAIL/S,,EQ/K,EXISTS/K"
  471.  
  472.       Examples :
  473.            IF EXISTS :c/cd
  474.            IF ERROR
  475.  
  476.  
  477.  
  478.  
  479.  LAB            defines a label ( see SKIP ).
  480.  
  481.       Format   : LAB <string>
  482.  
  483.       Template : LAB <text>
  484.  
  485.       Examples :
  486.            LAB error-location
  487.            LAB ok
  488.  
  489.  
  490.  
  491.  
  492.  QUIT           exits from command sequence witha given error code.
  493.  
  494.       Format   : QUIT [<returncode>]
  495.  
  496.       Template : QUIT "RC"
  497.  
  498.       Examples :
  499.            QUIT 14
  500.            QUIT
  501.  
  502.  
  503.  
  504.  
  505.  SKIP           jumps forward to a LAB in a command sequence ( see LAB ).
  506.  
  507.       Format   : SKIP <label> 
  508.  
  509.       Template : SKIP "LABEL"
  510.  
  511.       Examples :
  512.            SKIP
  513.            SKIP error-location
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  WAIT           waits for, or until, a specified time.
  522.  
  523.       Format   : WAIT <n> [SECSECS] [MINMINS] [UNTIL<time>]
  524.  
  525.       Template : WAIT ",SEC=SECS/S,MIN=MINS/S,UNTIL/K"
  526.  
  527.       Examples :
  528.            WAIT
  529.            WAIT UNTIL 12:25
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  System and Storage Management
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  ASSIGN         assigns a logical device name to a file or directory
  544.  
  545.       Format   : ASSIGN [[<name>] <dir>] [LIST]
  546.  
  547.       Template : ASSIGN "NAME,DIR,LIST/S"
  548.  
  549.       Examples :
  550.             ASSIGN temp: DF0:source/files
  551.             ASSIGN cc: df1:/lc1
  552.                 now you can say 'cc: cfile' to compile a C file
  553.             ASSIGN LIST
  554.                 lists currently assigned device names
  555.  
  556.  
  557.  
  558.  
  559.  DATE           displays or sets the system date and time.
  560.  
  561.       Format   : DATE [<date>] [<time>] [TOVER <name>]
  562.  
  563.       Template : DATE "DATE,TIME,TO=VER/K"
  564.  
  565.       Examples :
  566.             DATE today
  567.             DATE yesterday
  568.             DATE tomorrow
  569.             DATE friday
  570.                 sets the date to the next friday after the current (wrong) 
  571.                 date
  572.             DATE 01-OCT-85 12:32
  573.  
  574.  
  575.  
  576.  
  577.  DISKCOPY       copies the contents of one entire floppy disk to another.
  578.  
  579.       Format   : DISKCOPY [FROM] <disk> TO <disk> [NAME <name>]
  580.  
  581.       Template : DISKCOPY "FROM/A,TO/A/K,NAME/K"
  582.  
  583.       Examples :
  584.            DISKCOPY FROM DF0: TO DF1:
  585.            DISKCOPY DF0: TO DF0: NAME "Copied Disk"
  586.                 names new disk "Copied Disk"
  587.  
  588.  
  589.  
  590.  
  591.  FAULT          displays messages corresponding to supplied fault 
  592.                 or error codes.
  593.  
  594.       Format   : FAULT [<n>]
  595.  
  596.       Template : FAULT ",,,,,,,,,,"
  597.  
  598.       Examples :
  599.            FAULT 123
  600.            FAULT 133 234 245
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  FORMAT         formats and initializes a new 3 1/2 inch floppy disk. 
  608.  
  609.       Format   : FORMAT DRIVE <drivename> NAME <string>
  610.  
  611.       Template : FORMAT "DRIVE/A/K,NAME/A/K"
  612.  
  613.       Examples :
  614.            FORMAT DRIVE DF0: NAME "New Blank Disk"
  615.  
  616.  
  617.  
  618.  
  619.  INFO           gives information about currently mounted disks
  620.  
  621.  
  622.       Format   : INFO
  623.  
  624.       Template : INFO
  625.  
  626.       Examples :
  627.            INFO
  628.  
  629.  
  630.  
  631.  
  632.  INSTALL        makes a formatted disk bootable.
  633.  
  634.  
  635.       Format   : INSTALL [DRIVE] <drive>
  636.  
  637.       Template : INSTALL "DRIVE/A"
  638.  
  639.       Examples :
  640.            INSTALL DF0:
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  RELABEL        changes the volume name of a disk.
  647.  
  648.  
  649.       Format   : RELABEL [DRIVE] <drive> [NAME] <name>
  650.  
  651.       Template : RELABEL "DRIVE/A,NAME/A"
  652.  
  653.       Examples :
  654.            RELABEL DF1: "Disk over there"
  655.  
  656.  
  657.